package com.mtzqc.common.init.impl

import android.app.Application
import com.didi.drouter.annotation.Service
import com.kingja.loadsir.core.LoadSir
import com.mtzqc.common.init.InitService
import com.mtzqc.common.loadsir.callback.XErrorCallBack
import com.mtzqc.common.loadsir.callback.XLoadingCallBack
import com.mtzqc.common.task.ITask
import me.jessyan.autosize.AutoSizeCompat
import me.jessyan.autosize.AutoSizeConfig

@Service(function = [InitService::class], priority = 107)
class LoadSirRegister : InitService {
    override val depName: String
        get() = "LoadSir"
    override val dependsLib: Array<Class<out ITask>>?
        get() = null
    override val depends: Array<String>?
        get() = null
    override val priority: Int
        get() = 107

    override fun executeInit(app: Application, debug: Boolean, dev: Boolean): Boolean {
        LoadSir.beginBuilder()
            .addCallback(XLoadingCallBack())
            .addCallback(XErrorCallBack())
            .commit()
        return true
    }
}